package com.smallnico.opencv;

import org.bytedeco.opencv.opencv_cudaimgproc.CannyEdgeDetector;
import org.opencv.core.Core;
import org.opencv.core.CvType;
import org.opencv.core.Mat;
import org.opencv.core.Scalar;
import org.opencv.core.Size;
import org.opencv.imgcodecs.Imgcodecs;
import org.opencv.imgproc.Imgproc;

public class OpenCVTest {

	public static void main(String[] args) {
		System.loadLibrary(Core.NATIVE_LIBRARY_NAME);

		String outPath = "C:\\Users\\ainil\\Desktop\\test_out.jpg";
		String originalImgPath = "C:\\Users\\ainil\\Desktop\\test.jpg";
		Mat img = Imgcodecs.imread(originalImgPath);


		Imgproc.cvtColor(img, img, Imgproc.COLOR_BGR2GRAY);
		Imgproc.Canny(img, img, 50, 50, 3, true);

		Imgcodecs.imwrite(outPath, img);


	}
}
